﻿using System;
using System.Collections.Generic;
using System.Text;

namespace MarsCrawler.DataModels
{
	/// <summary>
	/// 下载实例模型
	/// </summary>
	public class ExampleModel
	{
		int id = -1;
		string name = string.Empty;
		string detailUrl = string.Empty;
		string category = string.Empty;
		string categoryUrl = string.Empty;
		int hotNum = -1;
		int downloadCount = -1;
		int needScore = 0;
		string devLanguage = string.Empty;
		string downloadSize = string.Empty;
		DateTime pubdate;
		string pubPersion = string.Empty;
		string downloadUrl = string.Empty;
		List<string> tags = new List<string>();

		public int Id { get => id; set => id = value; }
		public string Name { get => name; set => name = value; }
		public string DetailUrl { get => detailUrl; set => detailUrl = value; }
		public string Category { get => category; set => category = value; }
		public string CategoryUrl { get => categoryUrl; set => categoryUrl = value; }
		public int HotNum { get => hotNum; set => hotNum = value; }
		public int DownloadCount { get => downloadCount; set => downloadCount = value; }
		public int NeedScore { get => needScore; set => needScore = value; }
		public string DevLanguage { get => devLanguage; set => devLanguage = value; }
		public string DownloadSize { get => downloadSize; set => downloadSize = value; }
		public DateTime Pubdate { get => pubdate; set => pubdate = value; }
		public string PubPersion { get => pubPersion; set => pubPersion = value; }
		public string DownloadUrl { get => downloadUrl; set => downloadUrl = value; }
		public List<string> Tags { get => tags; set => tags = value; }

		public ExampleModel()
		{
		}

		public ExampleModel(
			int id,
			string name, 
			string detailUrl, 
			string category,
			string categoryUrl, 
			int hotNum, 
			int downloadCount, 
			int needScore, 
			string devLanguage, 
			string downloadSize, 
			DateTime pubdate, 
			string pubPersion, 
			string downloadUrl, 
			List<string> tags)
		{
			this.id = id;
			this.name = name;
			this.detailUrl = detailUrl;
			this.category = category;
			this.categoryUrl = categoryUrl;
			this.hotNum = hotNum;
			this.downloadCount = downloadCount;
			this.needScore = needScore;
			this.devLanguage = devLanguage;
			this.downloadSize = downloadSize;
			this.pubdate = pubdate;
			this.pubPersion = pubPersion;
			this.downloadUrl = downloadUrl;
			this.tags = tags;
		}

		public override string ToString()
		{
			return $"name:{this.Name}, catgory:{this.Category},needScore:{this.NeedScore}";
		}
	}

}
